package com.shop.cereshop.app.dao.seckill;

import com.shop.cereshop.app.page.product.ProductDetail;
import com.shop.cereshop.app.page.seckill.SeckillkIndex;
import com.shop.cereshop.app.page.seckill.ShopSeckillDetail;
import com.shop.cereshop.app.page.tool.ToolProduct;
import com.shop.cereshop.app.param.renovation.RenovationParam;
import com.shop.cereshop.app.param.seckill.SeckillParam;
import com.shop.cereshop.commons.domain.tool.CereShopSeckill;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CereShopSeckillDAO {
    int deleteByPrimaryKey(Long shopSeckillId);

    int insert(CereShopSeckill record);

    int insertSelective(CereShopSeckill record);

    CereShopSeckill selectByPrimaryKey(Long shopSeckillId);

    int updateByPrimaryKeySelective(CereShopSeckill record);

    int updateByPrimaryKey(CereShopSeckill record);

    SeckillkIndex findShop(@Param("shopId") Long shopId);

    List<ToolProduct> findProducts(SeckillParam param);

    ProductDetail findBySkuId(@Param("skuId") Long skuId, @Param("shopSeckillId") Long shopSeckillId);

    Long findByProductId(@Param("skuId") Long skuId);

    List<ShopSeckillDetail> getSeckills(RenovationParam param);
}